]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
ibusCandidatePopup: Prevent it from covering screenshot UI
authorAlynx Zhou <alynx.zhou@gmail.com>
Mon, 4 Jul 2022 03:59:43 +0000 (11:59 +0800)
committerMarge Bot <marge-bot@gnome.org>
Mon, 4 Jul 2022 13:38:15 +0000 (13:38 +0000)
If we only raise screenshot UI to top, ibusCandidatePopup can still
cover screenshot UI because each time ibusCandidatePopup updates it's
visibility it will raise it to top and this also happens if we open
screenshot UI via keybinding. This commit fixes it by only raising it
above keyboardBox, because keyboardBox is above all entries in modal
dialogs.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2331>

js/ui/ibusCandidatePopup.js

index 2a34144d591577f85467014ba26e252cadb6940a..6d7c0e0fa9e4a05ef65d201f374986018011cf95 100644 (file)
@@ -322,7 +322,12 @@ class IbusCandidatePopup extends BoxPointer.BoxPointer {
         if (isVisible) {
             this.setPosition(this._dummyCursor, 0);
             this.open(BoxPointer.PopupAnimation.NONE);
-            this.get_parent().set_child_above_sibling(this, null);
+            // We shouldn't be above some components like the screenshot UI,
+            // so don't raise to the top.
+            // The on-screen keyboard is expected to be above any entries,
+            // so just above the keyboard gets us to the right layer.
+            const { keyboardBox } = Main.layoutManager;
+            this.get_parent().set_child_above_sibling(this, keyboardBox);
         } else {
             this.close(BoxPointer.PopupAnimation.NONE);
         }